home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Amiga Collections: Taifun
/
Taifun 082 (1989-02-15)(Ossowski, Stefan)(DE)(PD).zip
/
Taifun 082 (1989-02-15)(Ossowski, Stefan)(DE)(PD).adf
/
TinyCycle
/
Amiga.ASM
< prev
next >
Wrap
Assembly Source File
|
1988-11-11
|
923b
|
74 lines
;
; Include-Datei für Standardprogramme
;
_LVOFindTask EQU -$0126
_LVOWaitPort EQU -$0180
_LVOGetMsg EQU -$0174
_LVOReplyMsg EQU -$017a
_LVOForbid EQU -$0084
PR_CLI EQU 172
PR_MsgPort EQU 92
CALLSYS:MACRO $\1
JSR _LVO\1(A6)
ENDM
LINKSYS:MACRO $\1,$\2
MOVE.L A6,-(SP)
MOVE.L \2,A6
JSR _LVO\1(A6)
MOVE.L (SP)+,A6
ENDM
INIT_AMIGA:MACRO
MOVE.L SP,Initial_SP
MOVE.L 4,A6
MOVE.L A6,ExecBase
SUBA.L A1,A1
CALLSYS FindTask
MOVE.L D0,Own_Task
; Start from Workbench ?
MOVE.L D0,A4
TST.L PR_CLI(A4)
BNE.S \1
; Hole Message
LEA PR_MsgPort(A4),A0
CALLSYS WaitPort
LEA PR_MsgPort(A4),A0
CALLSYS GetMsg
MOVE.L D0,WBenchMsg
\1:
ENDM
EXIT_AMIGA:MACRO
TST.L WBenchMsg
BEQ.S \1
CALLSYS Forbid
MOVE.L WBenchMsg,A1
CALLSYS ReplyMsg
\1:
MOVEQ #0,D0
MOVE.L Initial_SP,SP
RTS
BSS
WBenchMsg:DS.L 1
Own_Task:DS.L 1
ExecBase:DS.L 1
Initial_SP:DS.L 1
TEXT
ENDM
END